<template>
  <div class="container">
    <scroll-view :scroll-y="true"
                 :style="{'height': '100%'}"
                 @scrolltolower="load_more"
                 v-if="hos_result.length>0">
      <hospital-list :hos_list="hos_result"></hospital-list>
      <list-botton v-if="tobottom"></list-botton>
    </scroll-view>
    <empty v-else></empty>
  </div>
</template>

<script>
import hospitalList from '@/components/search_list/hospital_list'
import listBotton from '@/components/search/result_item/bottom'
import empty from "@/components/search/empty";
export default {
  data () {
    return {
      page: 1
    }
  },
  components: {
    hospitalList, listBotton, empty
  },
  props: ["hos_result", "tobottom"],
  methods: {
    load_more () {
      this.page++
      this.$emit("loadMore", this.page)
    }
  },
  watch: {
    tobottom (newVal, oldVal) {

    },
    hos_result (newVal, oldVal) {

    },
  },
  created () {
  },
}
</script>

<style lang="less" scoped>
.container {
  height: 100%;
}
</style>